<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Transtion of fr_dj for widgets</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<link href="../../../common/reset.css" type="text/css" rel="stylesheet"/>
			<link href="../../../common/common.css" type="text/css" rel="stylesheet"/>
			
			<link href="../../../ui/tabmenu/tabmenu.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/dropdownlist/dropdownlist.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/datagrid/datagrid.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/dragdrop/dragdrop.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/scrollpanel/scrollpanel.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/selectbutton/selectbutton.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/calendar/calendar.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/pagination/pagination.css" type="text/css" rel="stylesheet"/>
			<link href="../../../ui/cascademenu/cascademenu.css" type="text/css" rel="stylesheet"/>
			
			<link href="../../../widgets/gla/gla.css" type="text/css" rel="stylesheet"/>
			
			<link href="../../../ui/slider/slider.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/chart/chart.css" type="text/css" rel="stylesheet"/>

			<link href="../../../widgets/quote/quote.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/watchlist/watchlist.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/news/news.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/autocomplete/autocomplete.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/marketCommodityfutures/market_commodityfutures.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/marketCommodityfutures/market_commodityfutures_disn.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/marketIndex/marketIndex.css" type="text/css" rel="stylesheet"/>
			<link href="../../../widgets/options/options.css" type="text/css" rel="stylesheet" />
			
			<link href="../../../theme/default/style.css" type="text/css" rel="stylesheet"/>  
			
		
		<script src="../../../lib/jquery.js" type="text/javascript"></script>
		<script type="text/javascript" src="../../../formatter/qs_formatter_fr_dj.js"></script>
		<script type="text/javascript" src="../../../common/common.js"></script>
		<!--core-->
		<script type="text/javascript" src="../../../lib/jquery.mousewheel.js"></script>
		<script type="text/javascript" src="../../../lib/jquery.json.min.js"></script>
		<script type="text/javascript" src="../../../core/common.js"></script>
		<script type="text/javascript" src="../../../core/permissionChecker.js"></script>
		<script type="text/javascript" src="../../../core/tickers.js"></script>
		<script type="text/javascript" src="../../../core/subscriber.js"></script>
		<script type="text/javascript" src="../../../core/dataHandler.js"></script>
		<script type="text/javascript" src="../../../core/pull.js"></script>
		<script type="text/javascript" src="../../../core/push.js"></script>
		<script type="text/javascript" src="../../../core/SDKDataManager.js"></script>
		
		<!--UI-->
		<script type="text/javascript" src="../../../ui/util/util.js"></script>
		<script type="text/javascript" src="../../../ui/tabmenu/tabmenu.js"></script>
		<script type="text/javascript" src="../../../ui/scrollpanel/scrollpanel.js"></script>
		<script type="text/javascript" src="../../../ui/datagrid/datagrid.js"></script>
		<script type="text/javascript" src="../../../ui/selectbutton/selectbutton.js"></script>
		<script type="text/javascript" src="../../../ui/dragdrop/dragdrop.js"></script>
		<script type="text/javascript" src="../../../ui/customview/customview.js"></script>
		<script type="text/javascript" src="../../../ui/datagrid/multi_datagrid.js"></script>
		<script type="text/javascript" src="../../../ui/cascademenu/cascademenu.js"></script>
		<script type="text/javascript" src="../../../ui/dropdownlist/dropdownlist.js"></script>
		<script type="text/javascript" src="../../../ui/calendar/calendar.js"></script>
		<script type="text/javascript" src="../../../ui/pagination/pagination.js"></script>
		<!--gla widget-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_gla_fr_dj.js"></script>
		<script type="text/javascript" src="../../../widgets/gla/listView.js"></script>
		<script type="text/javascript" src="../../../widgets/gla/gla.js"></script>
		
		<!-- chart-->
		<!--[if lte IE 8]><script type="text/javascript" src="../../../excanvas.min.js"></script><![endif]-->
		<script src="../../../widgets/chart/simpleAutoCompleteBox.js" type="text/javascript"></script>
		<script src="../../../ui/slider/slider.js" type="text/javascript"></script>
		<script src="../../../widgets/autocomplete/autocomplete.js" type="text/javascript"></script>
		<script src="../../../language/fr_dj/qs_chart_fr_dj.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/chartUI.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/chartDraw.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/chartUtil.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/indicatorCalculation.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/chartDataManager.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/baseChart.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/stockChart.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/fundChart.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/forexChart.js" type="text/javascript"></script>
		<script src="../../../widgets/chart/mstar.flot.js" type="text/javascript"></script>
	
	   <!-- quote-->
	    <script src="../../../language/fr_dj/qs_quote_fr_dj.js" type="text/javascript"></script>
	   	<script type="text/javascript" src="../../../widgets/quote/quotebase.js"></script>
		<script type="text/javascript" src="../../../widgets/quote/quote.js"></script>
		<script type="text/javascript" src="../../../widgets/quote/quote_settingpanel.js"></script>
		<script type="text/javascript" src="../../../widgets/autocomplete/autocomplete.js"></script>
		<script type="text/javascript" src="../../../widgets/quote/quote_datapoints_map.js"></script>
	    
	   <!--watchlist-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_watchlist_fr_dj.js"></script>
		<script type="text/javascript" src="../../../widgets/watchlist/dataColumn.js"></script>
		<script type="text/javascript" src="../../../widgets/watchlist/tickerList.js"></script>
		<script type="text/javascript" src="../../../widgets/watchlist/simpleWatchlist.js"></script>
		
		<!--news-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_news_fr_dj.js"></script>
		<script type="text/javascript" src="../../../widgets/news/news_DataManager.js"></script>
		<script type="text/javascript" src="../../../widgets/news/news.js"></script>
		<script type="text/javascript" src="../../../widgets/autocomplete/autocomplete.js"></script>
		
	    <!--future-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_commodityfutures_fr_dj.js"></script>
		<script type="text/javascript" src="../../../common/common.js"></script>
		<script type="text/javascript" src="../../../widgets/marketCommodityfutures/market_commodityfutures.js"></script>
		
		<!-- market index-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_marketindex_fr_dj.js"></script>
		<script type="text/javascript" src="../../../widgets/minichart/minichart.canvas.js"></script>
		<script type="text/javascript" src="../../../widgets/minichart/minichart.js"></script>
		<script type="text/javascript" src="../../../widgets/marketIndex/marketIndex.js"></script>
		<script type="text/javascript" src="../../../theme/default/style.js"></script>
		<!--options-->
		<script type="text/javascript" src="../../../language/fr_dj/qs_options_fr_dj.js"></script>
		<script type="text/javascript" src="../../../widgets/options/options_settingpanel.js"></script>
		<script type="text/javascript" src="../../../widgets/options/optionsWidget.js"></script>
		<script type="text/javascript" src="../../../widgets/options/options.js"></script>
		<!--Quicktake-->
		<script type="text/javascript" src="../../../widgets/quicktake/quicktake.js"></script>
    </head>
    <body style="overflow: auto; padding: 0; margin: 0">
		<div id ="sdk-chart-panel" style="width:870px"></div>
		<div id = "sdk-chart"></div>
		<div class="sdk-marketcommodityfutures-container"></div>
		<div class="sdk-GainerLoserActive-container" style="width:800px;height:300px"></div>
		<div class="sdk-watchlist-container"></div> 
		<div class="sdk-quote-container" id = "sdk-quote"></div>
		<div class="sdk-marketindex-container" id = "sdk-marketindex"></div>
		<div class="sdk-options-container" id = "sdk-options"></div>
		<div class="sdk-quicktake-container" id="sdk-quicktake" style="width:870px;height:800px"></div>
		<div class="sdk-news-container" id = "sdk-news"></div>
		
		<script>
		QSAPI.init("DISN");

		QSAPI.DataManager.Chart.dataDomain = "//qsstage.morningstar.com/";
		QSAPI.DataManager.Chart.crossDomain = true;
		
		var chartWidget = new QSAPI.Widget.Chart.Stock("MSFT", "USA", "en_us");
		var gla,marketCommodityfutures,watchlistWidget,quoteWidget,newsWidget,marketIndexWidget,optionsWidgets,quicktakeWidget;
		QSAPI.Authentication.login("511F1BFFABACF2797D53014B7B7EF29F502E7015781E8D93A04989A70197E422B9AC0FE2E59882CDC9713E118EEA680F7F0E859C73FBD6BEF64C7DD04490EF1A","62D2A0641B01FBF65FA127365CDC0DC427458A67D958FC979718FF067CCD1A8D8D4E839255D60957C1A502D25C724A1D65F6EEE07636A0AA84E8F51C8D1831EE",{   // login in to QS web server to get the data permission
			onSuccess:function(result){
				QSAPI.DataManager.Chart.dataSourceType = "pull"
				QSAPI.DataManager.connectToPull("http://qsstage.morningstar.com/pullservice/pull/getPullQuote.jsp",5000,{
					onSuccess:function(result){
						chartWidget.init("sdk-chart",{width:870,height:360},{container:$("#sdk-chart-panel"),config:{autoCompleteBox:true}});
						marketCommodityfutures=new QSAPI.Widget.MarketCommodityFutures($('.sdk-marketcommodityfutures-container'),{},{},"marketCommodityfutures_0");
						gla=new QSAPI.Widget.GainerLoserActive($('.sdk-GainerLoserActive-container'),{exchange:'TSX'});
						watchlistWidget= new QSAPI.Widget.Watchlist($(".sdk-watchlist-container"),{
                                displayLayout:"list",
                                openedList:[-1,-2],
                                defaultWatchlist:-1,
                                showTab:true,
                                showLayout:false,
                                initwidth:600,
                                initheight:500,
                                rowDragable: true,
                                rowDropable: true,
                                cellResize:true,
                                sortable:true
                            },{},"watchlist_0");
                        watchlistWidget.init();
						QSAPI.TickerFactory.create([ "IBM" ], { // init the quote widget.
							onSuccess : function(tickerList) {
								var container=document.getElementById("sdk-quote");
								var tickerObject = tickerList[0];
								var options={
									dataPoints:'BidPrice,BidSize,AskSize,HighPrice,LowPrice,ClosePrice,OpenPrice',
									width:800,
									quoteToolBar:{queryBox:{show:false}}
								};
								quoteWidget = new QSAPI.Widget.Quote(container,options,{},"sdk-quote");
								quoteWidget.init();
								quoteWidget.acceptTicker(tickerObject);
							}
						});
						var mk_lan = QS_Lang.marketindices;
						marketIndexWidget= new QSAPI.Widget.MarketIndex($(".sdk-marketindex-container"),{
                                    initwidth:600,
									 menuList:["northamerican"],
                                    initheight:400
                                },{},"marketIndex_0");
						marketIndexWidget.setData({
                                "northamerican":{
                                    //"txt":"test name",
                                    "ticker":{
                                        "41:10:ADR":mk_lan["disn_amex_international"],
                                        "29:10:@CBN":mk_lan["disn_nasd_bank"],
                                        "29:10:@CCO":mk_lan["disn_nasd_composite"],
                                        "30:10:!DJU":mk_lan["disn_dj_average"],
                                        "29:10:@CIN":mk_lan["disn_nasd_industrial"],
                                        "29:10:NBI":mk_lan["disn_nasd_bio"],
                                        "126:10:IXCO":mk_lan["disn_nasd_computer"],
                                        "127:10:T00C":mk_lan["disn_sp_composite"],
                                        "127:10:TTEN":mk_lan["disn_sp_energy"],
                                        "127:10:TTFS":mk_lan["disn_sp_financial"],
                                        "127:10:TTGD":mk_lan["disn_sp_gold"],
                                        "127:10:TTMN":mk_lan["disn_sp_metals"],
                                        "127:10:TX20":mk_lan["disn_sp_small"],
                                        "127:10:TX40":mk_lan["disn_sp_completion"],
                                        "127:10:TX6C":mk_lan["disn_sp_60"],
                                        "33:10:TXX":mk_lan["disn_cboe_technology"],
                                        "33:10:VRO":mk_lan["disn_cboe_volatility"],
                                        "41:10:XCI":mk_lan["disn_amex_computer"],
                                        "41:10:XII":mk_lan["disn_amex_insdustrial"],
                                        "41:10:XMI":mk_lan["disn_amex_major"],
                                        "41:10:XOI":mk_lan["disn_amex_oil"]
                                    }
                                }
                            });
                        marketIndexWidget.init();
						QSAPI.TickerFactory.create(["IBM"], {
							onSuccess : function(tickerList) {
							var config = {
								fixHeight : true,
								optionsToolBar : {
									queryBox : {
										show : true,
									},
									setting : {
										show : true,
									}
								},
								height:600,
								width:955
							};
							var callbacks = {
								onLoad : function(data) {
								},
								onStateChange : function(state) {
								},
								afterAcceptTicker : function() {
								},
								onClick : function(rowdata) {
								},
							};
							optionsWidgets = new QSAPI.Widget.Options(document.getElementById("sdk-options"), config,
									callbacks, "sdk-options");
							optionsWidgets.init();
							optionsWidgets.acceptTicker(tickerList[0]);
							}
						});
						quicktakeWidget=new QSAPI.Widget.Quicktake($('.sdk-quicktake-container'),{lang:"fr_dj",ticker:"MSFT"},null,'sdk-quicktake');
						newsWidget =new QSAPI.Widget.News($('.sdk-news-container'), null,{
							onClick:function(result){},
							onLoad:function(result){},
							onHeightChange:function(result){},
							onStateChange:function(){}
						},"news1");
						
					}
				}) // push or pull.
			},
			onFailure:function(result){
			}
		});
		
		</script>
            
    </body>
</html>
